package utils;

import problem.Heuristic;
import problem.logic;
import env.City;
import env.Move;
import utils.AiSearch.AiNode;

public class AstarStrategy implements Strategy {
	
	private City goal;
	
	public AstarStrategy(City goal) {
		this.goal = goal;
	}

	@Override
	public void calcCost(AiNode n1, AiNode n2, Move move) {
		n2.cost = n1.cost + logic.calcCost(move) + Heuristic.getHeuristic(n2.copiedWorld, goal);
	}

}
